<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ page import="javax.sql.*, model.*, java.util.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
		<%
			String userId = (String) request.getParameter("user");
			Applicant applicant = Database.getApplicantById(Integer.parseInt(userId));
		%>	
		
		Application Review: 
		<a href="/StrutsCSE135/pages/invalidate.jsp" style="float: right;">logout</a>
		
		<hr style="text-decoration:bold;" />
		
		Application Status: <%=Database.getAppStatus(Integer.parseInt(userId))%><br/>
		Application
		<hr />
		<%=Applicant.printApplicant(Database.getApplicantById(Integer.parseInt(userId)))%>
		<br>
		Degrees
		<hr />
		<%= Database.printDegrees(Database.getDegrees(Integer.parseInt(userId))) %>
		<hr style="text-decoration:strong;"/>
		Input of other reviewers: <br />
		
		<% Vector comments = Database.getAllComments(Integer.parseInt(userId));
		   Vector reviewerGrades = Database.getAllGrades(Integer.parseInt(userId)); %>
		   
		  
		 <table>
		 		<tr>
		 			<th style="width: 200px; text-align:center;"> Reviewer Number </th>
		 			<th style="width: 150px; text-align:center;"> Grade </th>
		 			<th style="width: 500px; text-align:center;"> Comments </th>
		 		</tr>
		 
		 	<% for(int i = 0; i< comments.size(); i++) { %>
		 		<tr>
		 			<td style="width: 200px; text-align:center;" > <%= i %> </td>
		 			<td style="width: 150px; text-align:center;"> <%= reviewerGrades.get(i) %></td>
		 			<td style="width: 500px; text-align:center;"> <%= comments.get(i) %></td>
		 		</tr>
		 	<% } %>
		 </table>
		
</body>
</html>